package com.ms.service.service;

import com.ms.service.dao.ProductDao;
import com.ms.service.entity.Product;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductService {

    @Resource
    private ProductDao productDao;

    public List<Product> getProducts() {
        List<Product> productList =productDao.getProducts();
        return productList;
    }
    public Product getProduct(int id) {
        return productDao.getProduct(id);
    }

    public ProductService() {
    }
}
